package info.casel.tulebox;
import java.util.Random;

import com.opensymphony.xwork2.ActionSupport;

/**
 * Action to set attributes of a character
 * @author Casel
 * @thanks Enrico for the help
 *
 */
public class Attributes extends ActionSupport {

	private int intelligence = 0;
    private int strength = 0 ;
    private int skill = 0 ;
    private String result = "";
    
    /**
	 * @return the intelligence
	 */
	public int getIntelligence() {
		return intelligence;
	}


	/**
	 * @param intelligence the intelligence to set
	 */
	public void setIntelligence(int intelligence) {
		this.intelligence = intelligence;
	}


	/**
	 * @return the strength
	 */
	public int getStrength() {
		return strength;
	}


	/**
	 * @param strength the strength to set
	 */
	public void setStrength(int strength) {
		this.strength = strength;
	}


	/**
	 * @return the skill
	 */
	public int getSkill() {
		return skill;
	}


	/**
	 * @param skill the skill to set
	 */
	public void setSkill(int skill) {
		this.skill = skill;
	}


    
	 /**
     * 
     * @return result
     */
    public String getResult (){
    	return result;
    }
    
	@Override
    public String execute()
    {
		if(intelligence + strength + skill == 30){
			result = "Parametros correctos";
			return SUCCESS;
		}
		result = "Parametros incorrectos";
		return ERROR;
    }
           
   
    
}